<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<jsp:useBean id="date" class="java.util.Date" scope="page"/>
<jsp:useBean id="format" class="java.text.SimpleDateFormat" scope="page"/>
    <%
        format.applyPattern("yyyy-MM-dd HH:mm:ss");
        String time = format.format(date);
    %>
<p>当前时间：<%=time%></p>
</body>
</html>

